-
Notifications
You must be signed in to change notification settings - Fork 8
[WIP] Docker build #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Dockerfile to prepare for installation Clone of install script dedicated to docker installation - Remove sudo - Remove git pull of tasks and analysis - Update rabbitmq repo - Remove redundant apt-get calls - Install all pip dependencies through requirements file
- Fix task symlinks (must run from parent dir) - Fix all bash scripts with windows line endings - Save env vars (BMI3D path and python path) for future use - Add default entrypoint to run server - Fix config file path Signed-off-by: Tomek Fraczek <tfraczek@uw.edu>
Updating local to reflect remote changes
install/docker/src_code_install.sh
Outdated
| USER=root # We're in a docker container so root is safe | ||
|
|
||
| ####### Download any src code | ||
| git clone https://github.com/sgowda/plot $HOME/code/plotutil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this repo and the next one shouldn't be needed anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So should it be safe to just remove then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes i believe so
install/docker/src_code_install.sh
Outdated
| git clone https://github.com/sgowda/plot $HOME/code/plotutil | ||
| git clone https://github.com/sgowda/robotics_toolbox $HOME/code/robotics | ||
| # pygame | ||
| hg clone https://bitbucket.org/pygame/pygame $HOME/code/pygame |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this pip installable now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, good catch! Pygame was already in requirements.txt, removed the redundant download here
|
This is cool, thanks for taking a stab at it! Docker install would be helpful and low risk since if you wanted you can always install it the hard way. I think it would be good to check (sometime closer to merge) that the config allows access to files outside of the container, like data files -- I have had some issues with that previously with Docker. |
|
Thanks! I'll keep an eye out for that issue. Just to clarify though, do you mean to make sure that the docker image can write data files outside of the image? |
|
the docker image should be able to both read and write files outside of the container. writing is needed for saving behavioral data generated during the experiment, reading is needed for analyses which need to open data files and reference task source code. |
Optional pull request/up for discussion
To simplify the build process and make the application more operating system agnostic, I've wrapped the install in a docker container, built out of a series of dockerfiles.
Primarily, this allows the code to work in the exact same way on every machine, and to be isolated in it's own, safe environment. Additionally, the build/install process on new machines will be reduced to a one-liner (not counting network configurations), and can be easily extended to include a stable production version (related to #26).
For development purposes, the build process was split into several stages:
base,pythonandcode.base: build the os-level dependencies and directory strcturepython: build the python dependencies, set up python variablescode: build source-code based dependencies, run configuration and database setupThis allows the docker image to be rebuilt at any of the three levels, so as few as possible of the installs are repeated. Together with dockerfile caching, this allows for very quick build times.
Other related upgrades:
requirements.txtfile in install proceessNow uses
makemigrationsandmigrateinstead ofsyncdb/rline endings)On Linux, use :
./config.sh <image_name>. On windows use:config.bat <image_name>TODO
As of right now, the install is incomplete, as it is still missing some packages. Packages to still be added:
Testing and Setup
What do you think? Is this a valuable way to go?